package com.xiaohudie.servier.Impi;

import com.xiaohudie.annotation.LJL;
import com.xiaohudie.mapper.TestMapper;
import com.xiaohudie.servier.TestService;
import com.xiaohudie.util.DynamicDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author xiao hu die
 * @Date 2022/4/6 10:50
 * @Version 1.0
 */
@Service
public class TestServiceImpl implements TestService {
    @Autowired
    private TestMapper testMapper;
    @LJL("R")
    @Override
    public String testSelect() {
      //  DynamicDataSource.name.set("R");
        return testMapper.testSelect();
    }
    @Override
    @LJL("W")
    public Integer testUpdate() {
       // DynamicDataSource.name.set("W");
        return testMapper.testUpdate();
    }

    @Override
    @LJL("W")
    public Integer proTest8(Integer param) {
        return testMapper.proTest8(param);
    }
}
